﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

class CoreComp<T> where T:CoreComponent
{
    private Core core;

    private T comp;

    public T Comp => comp ? comp : core.GetCoreComponent(ref comp);

    public CoreComp(Core core)
    {
        if (core==null)
        {
            Debug.LogWarning($"核心组件为空{typeof(T)}");
        }
        this.core = core;
    }

  

}

